<!--
 * @Author: Vi卡农
 * @Date: 2020-01-06 09:28:29
 * @LastEditTime: 2020-04-15 16:05:36
 * @Description: -意向单-
 * @FilePath: \cshf_admin\src\views\modules\intention\intentionsellinfo.vue
 -->
<template>
  <el-card shadow="never" class="aui-card--fill">
    <div class="mod-intention__intentionsellinfo}">
      <el-form :inline="true" :model="dataForm" @keyup.enter.native="getDataList()">
        <el-form-item>
          <el-input v-model="dataForm.id" placeholder="id" clearable></el-input>
        </el-form-item>
        <el-form-item>
          <el-button @click="getDataList()">{{ $t('query') }}</el-button>
        </el-form-item>
        <el-form-item>
          <el-button type="info" @click="exportHandle()">{{ $t('export') }}</el-button>
        </el-form-item>
        <el-form-item>
          <el-button v-if="$hasPermission('intention:intentionsellinfo:save')" type="primary" @click="addOrUpdateHandle()">{{ $t('add') }}</el-button>
        </el-form-item>
        <el-form-item>
          <el-button v-if="$hasPermission('intention:intentionsellinfo:delete')" type="danger" @click="deleteHandle()">{{ $t('deleteBatch') }}</el-button>
        </el-form-item>
      </el-form>
      <el-table v-loading="dataListLoading" :data="dataList" border @selection-change="dataListSelectionChangeHandle" style="width: 100%;">
        <el-table-column type="selection" header-align="center" align="center" width="50"></el-table-column>
        <el-table-column prop="id" label="主键id" header-align="center" align="center"></el-table-column>
        <el-table-column prop="transactionType" label="交易类型" header-align="center" align="center"></el-table-column>
        <el-table-column prop="customerType" label="客源类型" header-align="center" align="center"></el-table-column>
        <el-table-column prop="customerId" label="客源id" header-align="center" align="center"></el-table-column>
        <el-table-column prop="houseId" label="房源id" header-align="center" align="center"></el-table-column>
        <el-table-column prop="fjId" label="房间id" header-align="center" align="center"></el-table-column>
        <el-table-column prop="area" label="房源面积" header-align="center" align="center"></el-table-column>
        <el-table-column prop="ownerName" label="业主姓名" header-align="center" align="center"></el-table-column>
        <el-table-column prop="ownerPhone1" label="业主电话" header-align="center" align="center"></el-table-column>
        <el-table-column prop="ownerPhone2" label="业主电话2" header-align="center" align="center"></el-table-column>
        <el-table-column prop="ownerPrice" label="业主价格" header-align="center" align="center"></el-table-column>
        <el-table-column prop="ownerSigningDate" label="业主签约时间" header-align="center" align="center"></el-table-column>
        <el-table-column prop="ownerPayments" label="业主首付" header-align="center" align="center"></el-table-column>
        <el-table-column prop="ownerNextDate" label="业主第二次付款时间" header-align="center" align="center"></el-table-column>
        <el-table-column prop="ownerNext" label="业主第二次付款金额" header-align="center" align="center"></el-table-column>
        <el-table-column prop="ownerCommission" label="业主佣金" header-align="center" align="center"></el-table-column>
        <el-table-column prop="ownerPayType" label="业主付款方式" header-align="center" align="center"></el-table-column>
        <el-table-column prop="ownerPay" label="业主付款金额" header-align="center" align="center"></el-table-column>
        <el-table-column prop="ownerTaxationType" label="业主税费付款方式" header-align="center" align="center"></el-table-column>
        <el-table-column prop="ownerTaxation" label="业主税费" header-align="center" align="center"></el-table-column>
        <el-table-column prop="ownerDeposit" label="业主押金" header-align="center" align="center"></el-table-column>
        <el-table-column prop="ownerIncrease" label="业主递增" header-align="center" align="center"></el-table-column>
        <el-table-column prop="ownerPurpose" label="业主房源用途" header-align="center" align="center"></el-table-column>
        <el-table-column prop="ownerDeliverTime" label="业主交房时间" header-align="center" align="center"></el-table-column>
        <el-table-column prop="ownerTransferTime" label="业主过户时间" header-align="center" align="center"></el-table-column>
        <el-table-column prop="ownerFurniture" label="业主家具" header-align="center" align="center"></el-table-column>
        <el-table-column prop="ownerEarnest" label="业主定金" header-align="center" align="center"></el-table-column>
        <el-table-column prop="customerName" label="客户姓名" header-align="center" align="center"></el-table-column>
        <el-table-column prop="customerPhone1" label="客户电话1" header-align="center" align="center"></el-table-column>
        <el-table-column prop="customerPhone2" label="客户电话2" header-align="center" align="center"></el-table-column>
        <el-table-column prop="customerPrice" label="客户价格" header-align="center" align="center"></el-table-column>
        <el-table-column prop="customerArea" label="客户需求面积" header-align="center" align="center"></el-table-column>
        <el-table-column prop="customerSigningDate" label="客户签约时间" header-align="center" align="center"></el-table-column>
        <el-table-column prop="customerPayments" label="客户首付" header-align="center" align="center"></el-table-column>
        <el-table-column prop="customerNextDate" label="客户第二次付款时间" header-align="center" align="center"></el-table-column>
        <el-table-column prop="customerNext" label="客户第二次付款金额" header-align="center" align="center"></el-table-column>
        <el-table-column prop="customerCommission" label="客户佣金" header-align="center" align="center"></el-table-column>
        <el-table-column prop="customerPayType" label="客户付款方式" header-align="center" align="center"></el-table-column>
        <el-table-column prop="customerPay" label="客户付款金额" header-align="center" align="center"></el-table-column>
        <el-table-column prop="customerTaxationType" label="客户税费付款方式" header-align="center" align="center"></el-table-column>
        <el-table-column prop="customerTaxation" label="客户税费" header-align="center" align="center"></el-table-column>
        <el-table-column prop="customerDeposit" label="客户押金" header-align="center" align="center"></el-table-column>
        <el-table-column prop="customerIncrease" label="客户递增" header-align="center" align="center"></el-table-column>
        <el-table-column prop="customerPurpose" label="客户房源用途" header-align="center" align="center"></el-table-column>
        <el-table-column prop="customerDeliverTime" label="客户交房时间" header-align="center" align="center"></el-table-column>
        <el-table-column prop="customerTransferTime" label="客户过户时间" header-align="center" align="center"></el-table-column>
        <el-table-column prop="customerFurniture" label="客户家具" header-align="center" align="center"></el-table-column>
        <el-table-column prop="customerEarnest" label="客户定金" header-align="center" align="center"></el-table-column>
        <el-table-column prop="state" label="意向单状态" header-align="center" align="center"></el-table-column>
        <el-table-column prop="external" label="是否外佣" header-align="center" align="center"></el-table-column>
        <el-table-column prop="important" label="是否重点单" header-align="center" align="center"></el-table-column>
        <el-table-column prop="remark" label="备注" header-align="center" align="center"></el-table-column>
        <el-table-column prop="deptId" label="部门id" header-align="center" align="center"></el-table-column>
        <el-table-column prop="deleteFlag" label="删除状态" header-align="center" align="center"></el-table-column>
        <el-table-column prop="tenantCode" label="城市租户编码" header-align="center" align="center"></el-table-column>
        <el-table-column prop="creator" label="创建者" header-align="center" align="center"></el-table-column>
        <el-table-column prop="createDate" label="创建时间" header-align="center" align="center"></el-table-column>
        <el-table-column prop="updater" label="修改人" header-align="center" align="center"></el-table-column>
        <el-table-column prop="updateDate" label="修改时间" header-align="center" align="center"></el-table-column>
        <el-table-column :label="$t('handle')" fixed="right" header-align="center" align="center" width="150">
          <template slot-scope="scope">
            <el-button v-if="$hasPermission('intention:intentionsellinfo:update')" type="text" size="small" @click="addOrUpdateHandle(scope.row.id)">{{ $t('update') }}</el-button>
            <el-button v-if="$hasPermission('intention:intentionsellinfo:delete')" type="text" size="small" @click="deleteHandle(scope.row.id)">{{ $t('delete') }}</el-button>
          </template>
        </el-table-column>
      </el-table>
      <el-pagination
        :current-page="page"
        :page-sizes="[10, 20, 50, 100]"
        :page-size="limit"
        :total="total"
        layout="total, sizes, prev, pager, next, jumper"
        @size-change="pageSizeChangeHandle"
        @current-change="pageCurrentChangeHandle">
      </el-pagination>
      <!-- 弹窗, 新增 / 修改 -->
      <add-or-update v-if="addOrUpdateVisible" ref="addOrUpdate" @refreshDataList="getDataList"></add-or-update>
    </div>
  </el-card>
</template>

<script>
import mixinViewModule from '@/mixins/view-module'
import AddOrUpdate from './intentionsellinfo-add-or-update'
export default {
  mixins: [mixinViewModule],
  data () {
    return {
      mixinViewModuleOptions: {
        getDataListURL: '/intention/intentionsellinfo/page',
        getDataListIsPage: true,
        exportURL: '/intention/intentionsellinfo/export',
        deleteURL: '/intention/intentionsellinfo',
        deleteIsBatch: true
      },
      dataForm: {
        id: ''
      }
    }
  },
  components: {
    AddOrUpdate
  }
}
</script>
